package com.xuwang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 监督检查表
 */
@ApiModel(value = "监督检查表")
public class SupervisoryCheck {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 检查单位
     */
    @ApiModelProperty(value = "检查单位")
    private String companyName;

    /**
     * 检查时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    // 下面是服务器响应返回的内容，如果没有格式化转换，那么返回的内容是长毫秒数，接收mysql数据库中的数据也需要设置东八区+8时
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "检查时间")
    private Date checkTime;

    /**
     * 检查类型
     */
    @ApiModelProperty(value = "检查类型")
    private Integer checkType;

    /**
     * 动态等级
     */
    @ApiModelProperty(value = "动态等级")
    private Integer dynamicRank;

    /**
     * 检查人（政府工作人员）
     */
    @ApiModelProperty(value = "检查人（政府工作人员）")
    private String name;

    /**
     * 问题内容
     */
    @ApiModelProperty(value = "问题内容")
    private String problem;

    /**
     * 意见
     */
    @ApiModelProperty(value = "意见")
    private String opinion;

    /**
     * 其他
     */
    @ApiModelProperty(value = "其他")
    private String other;

    /**
     * 附件（监督检查记录）
     */
    @ApiModelProperty(value = "附件（监督检查记录）")
    private String appendix;

    public Integer getId () {
        return id;
    }

    public void setId (Integer id) {
        this.id = id;
    }

    public String getCompanyName () {
        return companyName;
    }

    public void setCompanyName (String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public Date getCheckTime () {
        return checkTime;
    }

    public void setCheckTime (Date checkTime) {
        this.checkTime = checkTime;
    }

    public Integer getCheckType () {
        return checkType;
    }

    public void setCheckType (Integer checkType) {
        this.checkType = checkType;
    }

    public Integer getDynamicRank () {
        return dynamicRank;
    }

    public void setDynamicRank (Integer dynamicRank) {
        this.dynamicRank = dynamicRank;
    }

    public String getName () {
        return name;
    }

    public void setName (String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getProblem () {
        return problem;
    }

    public void setProblem (String problem) {
        this.problem = problem == null ? null : problem.trim();
    }

    public String getOpinion () {
        return opinion;
    }

    public void setOpinion (String opinion) {
        this.opinion = opinion == null ? null : opinion.trim();
    }

    public String getOther () {
        return other;
    }

    public void setOther (String other) {
        this.other = other == null ? null : other.trim();
    }

    public String getAppendix () {
        return appendix;
    }

    public void setAppendix (String appendix) {
        this.appendix = appendix == null ? null : appendix.trim();
    }

    @Override
    public String toString () {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", companyName=").append(companyName);
        sb.append(", checkTime=").append(checkTime);
        sb.append(", checkType=").append(checkType);
        sb.append(", dynamicRank=").append(dynamicRank);
        sb.append(", name=").append(name);
        sb.append(", problem=").append(problem);
        sb.append(", opinion=").append(opinion);
        sb.append(", other=").append(other);
        sb.append(", appendix=").append(appendix);
        sb.append("]");
        return sb.toString();
    }
}